package com.xuanyuan.arouterdemo.base

import android.os.Bundle
import android.util.Log
import androidx.appcompat.app.AppCompatActivity
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.xuanyuan.arouterdemo.base.IArouterConstants.KEY_AGE


@Route(path = IArouterConstants.PATH_AROUTER_AUTO)
class AutowiredActivity : AppCompatActivity() {
    @JvmField
    @Autowired(name = "name")
    var name: String = ""

    @JvmField
    @Autowired(name = KEY_AGE)
    var age = 0

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_autowired)
        ARouter.getInstance().inject(this)
        Log.i("11111111", "name ==" +"      "+ name + "age ==" + age);
    }


}